<?php
include "connection.php";
$username=$_GET['username'];
$password=$_GET['password'];


$result=mysql_query("SELECT * FROM tusers WHERE username='$username' and password='$password'");
while ($row = mysql_fetch_object($result)) 
		{
			$response["photo"]=$row->photo;
		}
		
$count=mysql_num_rows($result);

if($count==1)
{
	$response["code"]="1";
	$response["msg"] = "User is logged in successfully";
}
else
{
	$response["code"]="0";
	$response["msg"] = "User Name/ Password incorrect";
}

echo json_encode($response);

?>






